/**
 *  @FileName: Test.java
 *  @Last Modified Date: CharlW
 *  @Description: 演示了DataInputStream和DataOutputStream的使用
 */

import java.io.*;

public class Test {
	public static void main(String[] args) throws IOException {
		DataInputStream from = new DataInputStream(
								new FileInputStream("from.txt"));
								
		DataOutputStream out = new DataOutputStream(
									new FileOutputStream("out.txt"));
		
		String count;
		while ((count = from.readLine()) != null) {
			String str = count.toUpperCase();
			System.out.println(str);
			out.writeBytes(str + " ,");
		}
		from.close();
		out.close();
	}
}